var fs  = require("fs");

var ct = fs.readFileSync('../questions/all.json','utf-8');

ct = JSON.parse(ct);


var index = 0;
var num=1;
while(true){
	var qs = ct.slice(index,index+10);
	fs.writeFileSync('../questions/q'+num+'.json',JSON.stringify(qs));
	num++;
	index = index+10;
	if(index>=ct.length){
		return;
	}
}

